'use strict';

angular.module('xuexibangApp')
  .config(function($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.when("/article", "/article/editarticle");
    $stateProvider
      .state('article', {
        url: '/article',
        templateUrl: 'app/article/article.html',
        controller: 'ArticleCtrl'
      })
      .state("article.history", {
        url: "/history",
        templateUrl: "app/article/history.html",
        controller: 'HistoryarticleCtrl'
      })
      .state("article.editarticle", {
        url: "/editarticle?id",
        templateUrl: "app/article/editarticle.html",
        controller: 'EditarticleCtrl'
      });
  });
